package cn.fastoo.common.service;

import cn.hutool.core.util.URLUtil;

import java.net.URL;

/**
 * Created by lowkey on 18/4/23.
 */
public class QRCodeGenerator {

    public static String getDoorContent(Long id){
        return "http://www.gymoblie.com/qrcode?doorId="+id;
    }
    public static Boolean valiadte(String content){
        return content.startsWith("http://www.gymoblie.com/qrcode?");
    }

    public static void main(String[] args) {
        String str = URLUtil.formatUrl("http://www.gymoblie.com/qrcode?doorId=10003");
        URL url = URLUtil.url(str);
        System.out.println(url);

    }
}
